<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=div, initial-scale=1.0" />
    <title>立方体</title>
    <style>
      .box {
        width: 300px;
        height: 300px;
        margin: 200px auto;
        transform-style: preserve-3d;
        transform: rotateX(-40deg) rotateY(-40deg);
      }

      .box > div {
        position: absolute;
        background-color: rgba(255, 0, 0, 0.4);
        color: #fff;
        text-align: center;
        width: 200px;
        height: 200px;
        line-height: 200px;
        border: 1px solid #000;
        font-size: 60px;
      }
      .box > div:nth-child(1) {
        transform: translateZ(100px);
      }
      .box > div:nth-child(2) {
        transform: rotateX(-90deg) translateZ(100px);
      }
      .box > div:nth-child(3) {
        transform: rotateY(-90deg) translateZ(100px);
      }
      .box > div:nth-child(4) {
        transform: rotateY(90deg) translateZ(100px);
      }
      .box > div:nth-child(5) {
        transform: rotateX(90deg) translateZ(100px);
      }
      .box > div:nth-child(6) {
        transform: rotateY(180deg) translateZ(100px);
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div>1</div>
      <div>2</div>
      <div>3</div>
      <div>4</div>
      <div>5</div>
      <div>6</div>
    </div>
  </body>
</html>
